package com.bw.lib_common.base

import androidx.appcompat.widget.Toolbar
import androidx.databinding.ViewDataBinding
import com.bw.lib_common.R

/**
 * @author ytx
 * @date 2025-09-22 10:00
 * @description 带有toolbar的activity
 */
abstract class BaseToolBarActivity<VM:BaseViewModel,VDB: ViewDataBinding>:BaseActivity<VM,VDB>() {


    protected lateinit var mToolbar: Toolbar

    override fun initView() {
        mToolbar = mBinding.root.findViewById(R.id.toolbar)
        initToolBar(mToolbar)
        mToolbar.setNavigationOnClickListener { onBackPressed() } //点击返回键
    }

    protected open fun initToolBar(toolBar: Toolbar) {

    }



}